<template>
	<!--头部-->
	<div class="myContent">
		<!--<div style="height:3rem;"></div>-->
		<div style="width:100%;height:100%;overflow-y: auto;">
            <div id="AfterSaleOutBox" style="flex:1;">
                <div id="afterSaleContent" style="flex:1;">
                    <!-- class="top_div" -->
                    
                    <!--商品列表-->
                    <!-- aui-content  -->
                    <div>
                        <ul class="aui-list aui-media-list commodity_list subtotal_list" style="text-align: left;">
                            <li class="aui-list-item">
                                <div class="aui-media-list-item-inner">
                                    <div class="aui-list-item-media">
                                        <!--<img :src="getItemImg(shopObj)">  shopObj.goodsImg || 'static/image/demo1.png'-->
                                        <img :src="getItemImg(shopObj)  || 'static/image/demo2.png'">
                                    </div>
                                    <div class="aui-list-item-inner suggest">
                                        <!-- overflow:hidden;text-overflow:ellipsis;display:-webkit-box; -webkit-box-orient:vertical;-webkit-line-clamp:2; -->
                                        <h3 style="min-height: 1.5rem;">{{shopObj.goodsName}}</h3>
                                        <p v-if="shopObj.buyType!=4&&shopObj.realTotalMoney || shopObj.buyType!=4&&shopObj.realTotalMoney==0">总价：¥{{Number(shopObj.realTotalMoney).toFixed(2)}}</p>    <!--getSingerPrice(shopObj)-->
                                        <p v-if="shopObj.buyType==4">积分单价：{{shopObj.realPrice}}</p>
                                        <!--产品确认售后不显示规格-->
                                        <!--<p v-if="shopObj.goodsSpec">{{shopObj.goodsSpec? '规格：' + shopObj.goodsSpec : "&nbsp;"}}</p>-->
                                        
                                        <p v-if="shopObj.goodsType != 7">数量：{{shopObj.outGoodsNum}} <span style="color: #9E9E9E;" v-if="shopObj.goodsType != 6">/{{shopObj.mallUnit}}</span> <span style="color: #9E9E9E;" v-if="shopObj.goodsType == 6">只</span></p>
                                        <p v-if="shopObj.goodsType == 7">重量：{{shopObj.outGoodsNum * 1000}}g</p>
                                        <p v-if="this.getWorkingInfo(shopObj,1)">加工服务：{{this.getWorkingInfo(shopObj,1)}}</p>
                                    </div>
                                </div>
                                <div class="myWorkingFeeBox" v-if="this.getWorkingInfo(shopObj,0)">
                                    <div style="width:5rem;"></div>
                                    <div class='myWorkingFee'>
                                        <div>{{this.getWorkingInfo(shopObj,0)}}(不参与优惠)</div>
                                        <div>¥{{this.getWorkingInfoFee(shopObj)}}</div>
                                    </div>
                                </div>
                            </li>
                            <!--v-if="orderServeList"-->
                            <li class="message_list" style="position: relative;padding: 0 0.75rem;padding-bottom: 0.75rem;" v-if="sendArr && sendArr.length" >
                                <div class="aui-list-item-arrow01 server_show" style="background-color: #fff2f2;padding: 0.2rem 0.5rem;">
                                    <!--<div style="margin-left: 0.5rem;" class="aui-list-item-arrow_1" v-for="(server,index) in orderServeList" :key="index">
                                        <h4>[服务]</h4>
                                        <dl>
                                            <dd>
                                                <font>{{server.serveName}}</font>
                                                <span>¥{{server.servePrice}}×{{server.serveNum}}</span>
                                            </dd>
                                            <dd>
                                            <font>全保换新1年</font>
                                            <span>¥88.8×2</span>
                                        </dd>
                                        </dl>
                                    </div>-->

                                    <div style="margin-left: 15;" class="aui-list-item-arrow_2" >
                                        <h4 style="text-align:left;" >[赠品]</h4>
                                        <dl v-for="(item,index) in sendArr"  :key="index">
                                            <dd>
                                                <font>{{item.goodsName}}</font>
                                                <span>¥{{getSingerPrice(item)}}×{{item.outGoodsNum}}</span>
                                            </dd>
                                        </dl>
                                    </div>
                                </div>
                            </li>
                        </ul>
                    </div>
                    <!-- aui-content  -->
                    <div class="aui-margin-b-15">
                        <ul class="aui-list aui-list-in" style="text-align: left;">
                            <li class="aui-list-item aui-content aui-list aui-form-list">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label" style="width:30%;">售后类型：</div>
                                    <div class="aui-list-item-input">
                                        <p>{{shopObj.buyType!=4?aftermarkettype:'退积分'}}</p>
                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item aui-content aui-list aui-form-list">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label" style="width:30%;" v-if="shopObj.goodsType != 7">{{this.aftermarkettype == '退款'?'退款':'退货'}}数量：</div>
                                    <div class="aui-list-item-input" v-if="shopObj.goodsType != 7">
                                        <p>可退数量：{{canBackNum}} <span v-if="shopObj.goodsType != 6">/{{shopObj.mallUnit}}</span> <span v-if="shopObj.goodsType == 6">只</span> </p>
                                    </div>
                                    <div class="aui-list-item-label" style="width:30%;" v-if="shopObj.goodsType == 7">{{this.aftermarkettype == '退款'?'退款':'退货'}}重量：</div>
                                    <div class="aui-list-item-input" v-if="shopObj.goodsType == 7">
                                        <p>可退重量：{{shopObj.outGoodsNum * 1000}}g</p>
                                    </div>
                                    <div class="edit_data" style="bottom:0.4rem;" v-if="shopObj.goodsType != 7 && shopObj.buyType!=4">   <!--加购的商品-->
                                        <i class="del_cart" :class="{edit_data_click:(actureBackNum !=1&& canBackNum > actureBackNum) || (canBackNum> 1 && canBackNum == actureBackNum)}" @click="delCount"></i><span ref="money">{{actureBackNum}}</span><i @click.stop="addCount"  class="add_to_cart" :class="{add_to_cart_no:canBackNum < actureBackNum||canBackNum == actureBackNum}"></i>
                                    </div>
                                </div>
                            </li>
                            <li class="aui-list-item aui-content aui-list aui-form-list">
                                <div class="aui-list-item-inner" style=" white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
                                    <div class="aui-list-item-label" style="width:30%;">退款金额：</div>
                                    <div class="aui-list-item-input">
                                        <!--<input type="number" placeholder="最多￥200，含发货邮费￥6.00">-->
                                        <p v-if="shopObj.buyType!=4"><span class="aui-text-danger">¥{{refundamount}}</span>（实际退款金额以审核为准）</p>
                                        <p v-if="shopObj.buyType==4"><span class="aui-text-danger">{{shopObj.realTotalMoney}}积分</span></p>
                                    </div>
                                </div>
                            </li>
                            <!--@click="showBackReasonList"-->
                            <li class="aui-list-item" @click.stop="showPopup1">
                                <div class="aui-list-item-inner aui-list-item-arrow" style=" white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
                                    <div class="aui-list-item-title">
                                        {{this.aftermarkettype == '退款'?'退款':'退货'}}原因：
        
                                    </div>
                                    <p>{{upLoaddata.serviceReason?upLoaddata.serviceReason:'请选择'}}</p>
                                </div>
                            </li>
                            <!-- this.aftermarkettype === '退货退款'  // 5.24 产品要求将配送员上门取件默认为用户选择的方式 不给用户选择展示-->
                            <li class="aui-list-item" @click.stop="showGoBackPopup" v-if="false">
                                <div class="aui-list-item-inner aui-list-item-arrow" style=" white-space: nowrap; overflow: hidden; text-overflow: ellipsis">
                                    <div class="aui-list-item-title">
                                        <!--{{this.aftermarkettype == '退款'?'退款':'退货'}}原因：-->
                                        退回方式：
                                    </div>
                                    <p>{{upLoaddata.goodsReturnWay?goBackMethods[upLoaddata.goodsReturnWay-1].case:'请选择'}}</p>
                                </div>
                            </li>
                            <!--showGoBackPopup-->
                            <!--<li class="aui-list-item  checkeB" v-if="showBackReason">
                            <p v-for="(item,index) in backMoneyReason"  @click="changeCheckFlag(item,index)" key="index">
                                <input type="checkbox"  v-model ="item.flag" />{{item.case}}
                            </p>
                        </li>-->
                            <li class="aui-list-item aui-content aui-list aui-form-list">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label" style="width:30%;"><span>{{this.aftermarkettype == '退款'?'退款':'退货'}}说明：</span></div>
                                    <div class="aui-list-item-input">
                                        <textarea type="text" maxlength="100" placeholder="选填" class="liuyan" id="afterSaleOederNode" ref="note" v-model="reasonmsg"></textarea>
                                        <!--<textarea id="status" name="status" rows="6" cols="40" v-on:input="sshow"></textarea>-->
                                    </div>
                                </div>
                            </li>
                            <!--@click="showpackingCaseList"-->
                            <!--<li class="aui-list-item" v-if="aftermarkettype =='退货退款' "  @click.stop="showPopup2">
                            <div class="aui-list-item-inner aui-list-item-arrow">
                                <div class="aui-list-item-title">包装情况：</div>
                                <p>请选择</p>
                            </div>
                        </li>-->
                            <li class="aui-list-item aui-content aui-list aui-form-list" v-if="aftermarkettype =='退货退款' ">
                                <div class="aui-list-item-inner">
                                    <div class="aui-list-item-label" style="width:30%;">质量情况：</div>
                                    <div class="aui-list-item-input">
                                        <label v-for="(pack,index) in packingCase" style="margin-left:0.1rem;" :key='index'><input class="aui-radio" type="radio" name="demo1" @click.stop="changePacking(index)" :checked="pack.flag"> {{pack.case}}</label>
                                        <!--<label><input class="aui-radio" type="radio" name="demo1"> 包装损坏</label>-->
                                    </div>
                                </div>
                            </li>
                            <!--<li class="aui-list-item packingCase" v-if="showpackingCase">
                            <p v-for="(item1,index) in packingCase"  key="index">
                                <input type="checkbox"  v-model ="item1.flag" />{{item1.case}}
                            </p>
                        </li>-->
                        </ul>
                        <img-UpLoad-Ios v-if="getIosVersion() && aftermarkettype =='退货退款'" ref="imgUp" :title="'上传图片'"  :toast="false" :autoClear="false" style="background-color: #fff;background-image: none;padding: 0px 0.75rem;"></img-UpLoad-Ios>
                        <div style="margin-bottom:3rem;" v-if="!getIosVersion()">
                            <div v-if="aftermarkettype =='退货退款' " style="background:#fff;display:flex;justify-content:space-between;width:100%;padding-top:0.75rem;padding-bottom:0.75rem;padding-left:0.75rem;padding-right:0.75rem;">
                                <div>
                                    提交凭证：
                                </div>
                                <div style="font-size:0.5rem;color:#999;">
                                    最多可上传5张(取消请长按图片)
                                </div>
                            </div>
                            <img-UpLoad v-if="aftermarkettype =='退货退款' " style="padding: 0px 0.75rem;background-color: #fff;" ref="imgUp"  :toast="false" :autoClear="false" ></img-UpLoad>
                        </div>
                        <!--<ul class="aui-list aui-list-in" v-if="aftermarkettype =='退货退款' ">
                        <li class="aui-list-item aui-content aui-list aui-form-list">
                            <div class="aui-list-item-inner">
                                <div class="aui-list-item-label" style="width:30%;">提交凭证：</div>
                                <div class="aui-list-item-input">
                                    <p>最多可上传5张</p>
                                </div>
                            </div>
                        </li>
        
                        <li class="aui-list-item aui-list-item-middle aui-margin-b-15">
                            <div class="aui-card-list-content-padded aui-border-b aui-border-t aui-padded-l-0 aui-padded-t-0">
                                <div class="aui-row aui-row-padded">
                                    <div class="aui-col-xs-4">
                                        <img src="static/image/demo1.png" />
                                    </div>
                                    <div class="aui-col-xs-4">
                                        <img src="static/image/demo1.png" />
                                    </div>
                                    <div class="aui-col-xs-4">
                                        <img src="static/image/demo1.png" />
                                    </div>
                                    <div class="aui-col-xs-4">
                                        <img src="static/image/demo1.png" />
                                    </div>
                                    <div class="aui-col-xs-4">
                                        <img src="static/image/suneee-btn.png" />
                                    </div>
                                </div>
                            </div>
                        </li>
                    </ul>-->
                    </div>
                    <div style="height:3rem;" v-if="aftermarkettype =='退货退款'" id="afterSaleScroll"></div>
                </div>
            </div>
            <div class="settle_accounts aui-btn aui-btn-block aui-btn-danger zxBtnBottom" style="line-height: 2.5rem;height: 2.5rem;border-radius: 0px;background-color:#ef5423 !important;">
                <div style="font-size: 1rem;" tapmode @click.stop="updataApplication">提交申请</div>
            </div>
        </div>
        <div class="myMaster" v-if="showBackReason">

        </div>
        <div  class="myPopup" v-if="showBackReason">
            <div class="myPopupHeader">
                <div class="aui-list-item-label-icon" style="position: absolute;top: 0;right: 1.1rem;" @click="hidePopup1">
                    <i class="icon njfont nj-guanbi1"></i>
                </div>
                选择{{this.aftermarkettype == '退款'?'退款':'退货'}}原因
            </div>
            <div class="myPopupContent">
                <div style="width:100%;padding-left:.75rem;height:100%;">
                    <div class="myPopupItem" v-for="(item,index) in backMoneyReason" :key="index" @click.stop="changeCheckFlag($event, index, item.case)">
                        <div>
                            &nbsp;{{item.case}} 
                        </div>
                        <div style="padding-right:1rem;">
                            <input class="aui-checkbox" type="checkbox"  :checked="item.flag">
                        </div>
                    </div>
                </div>
            </div>
            <div class="myPopupFooter" @click.stop="getBackReason">
                <div id="confirm" style="font-size: 1rem;">确定</div>
            </div>
        </div>
	</div>
</template>

<script>
	import { mapGetters, mapActions } from 'vuex';
	import axios from "axios";
    // import { Popup } from 'mint-ui';
    // import { Popup } from '../../ui-components/popup';
    import ImgUpLoaderIos from '../../components/ImgUpload/index'; //IOS 上传
	import ImgUpLoader from '../../components/ImgUpload/index2';
	import { Toast } from "../../utils/toast";
	import { showLoading, hideLoading } from "../../utils/loading";
	import {translatePrice} from "../../utils/TranslatePriceC";
    import getUrl from '../../utils/getUrlSearch.js';
    import { CHANGE_NAVIGATION,EXIT_WEBVIEW,NAVIGATE } from '../../config/postMessage-types';
	export default {
		data() {
			return {
				popupVisible: false,
				popupGoBack:false,
				aftermarkettype: '',
				refundamount: '',
				reasonmsg: '',
				canBackNum: 0, //可退货数量
				actureBackNum: 0, //申请退货数量
				showBackReason: false,
				showpackingCase: false,
				upFlag: false,
				imgStatus: {},
				shopObj: {},
				backMoneyReasonId: null,
				isImg:false, // 是否需要上传图片
				orderServeList: null,
				parentNo: null, //总单号
				childNo:null, // 子单号
				afterSaleInfoAll: null, //售后单信息
				orderInfo: null, //总订单信息
				backMoneyState: null,
				goBackMethods:[{   // 5.24 产品要求将配送员上门取件默认为用户选择的方式 不给用户选择展示
						case: '配送员上门取件',
						flag: true
					},{
						case: '自行送货至门店',
						flag: false
					}
				],
				backMoneyReason: [],
				
				backMoneyReasonXW: [],  //从后台获取的所有的售后原因
				backMoneyReason2:[],  //存放可用的售后原因
				packingCase: [{
						case: '质量完好',
						flag: false
					},
					{
						case: '质量不好',
						flag: false
					}
				],
				afterSaleArr:[],  // 赠品与商品信息
				sendArr:[], //赠品
				addMoneyArr:[],  // 加价购商品信息
				afterSaleGoodsArr:[], // 申请售后商品信息
				//用于发起请求
				upLoaddata: {
                    "goodsReturnWay":1, // 5.24 产品要求将配送员上门取件默认为用户选择的方式 不给用户选择展示
					"enterpriseCode": null, //企业Code
					"applyAmount": null, //申请金额
					"serviceType": "2", //售后类型
					"serviceReason": null, //退货退款原因
					"serviceDesc": null, //退货退款描述
					"userPhone": "13826020035", //联系电话
					"goodsServernos": '', //服务单号
					"applyTm": null, //申请时间
					"orderNo": null, //订单编号
                    "goodsList":[],
                    "token":''
				},
				add:0, // 单个商品实付金额
				promotionMinis:0, //一类商品的优惠金额
				goodsPrice: 0 ,//单个商品的原价
				weighingFlag:false, // 是否是称重商品
				storeCode:null,
				orderType:null,
			}
		},
		components: {
			// "popup": Popup,
            "imgUpLoad": ImgUpLoader,
            "imgUpLoadIos":ImgUpLoaderIos
		},
		watch: {
			actureBackNum(newValue, oldValue) {
				this.actureBackNumData = newValue;
            },
            userInfo(newVal,oldVal){
                console.log('用户信息改变了,处理用户被挤重新登录展示原来用户数据问题')
                // 处理用户被挤重新登录展示原来用户数据问题 登录处理了 此情况跳个人中心
                // let titleConfig = JSON.stringify({
                //     type: EXIT_WEBVIEW,
                // })
                // setTimeout(() => {
                //     window.postMessage(titleConfig)
                // },300)
            }
		},
		methods: {
            //判断是否是IOS
            getIosVersion() {
                var u = navigator.userAgent, app = navigator.appVersion;
                var isAndroid = u.indexOf('Android') > -1 || u.indexOf('Linux') > -1; //g
                var isIOS = !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/); //ios终端
                if (isAndroid) {
                    //这个是安卓操作系统
                    return false
                }
                if (isIOS) {
            　　　　 return true;
                }
            },
			goBack() {
				this.$router.replace('afterSaleList');
			},
			getItemImg(item){
				if(item.goodsImg){
					var str = item.goodsImg.split(' ')[0];
					return str;
				}
            },
            //获取加工服务
            getWorkingInfo(item,num){
                console.log(item,'item &&')
                if(!item.workingInfo){return false}
                let arr = JSON.parse(item.workingInfo);
                let str = ''
                if(arr && arr.length){
                    arr.map((item,index) => {
                        if(item.processingType == 1 && num === 1){
                            str = item.processingItem || item.processingOptions;
                        }else if(item.processingType == 0 && num === 0){
                            str = item.processingOptions;
                        }
                    })
                }
                return str;
            },
            getWorkingInfoFee(item){
                if(!item.workingInfo){return false}
                let arr = JSON.parse(item.workingInfo);
                let str = ''
                console.log(arr,'getWorkingInfoFee')
                if(arr && arr.length){
                    arr.map((item,index) => {
                        if(item.processingType == 0){
                           str = Number(item.processingCost).toFixed(2)
                        }
                    })
                }
                return str;
            },
			//获取商品单价
			getSingerPrice(item){
                console.log(item);
				if(item.goodsType != 6){
                    console.log(item,'2');
					return item.realPrice;
				}else{
					var singerPrice = Number(item.realTotalMoney) / Number(item.outGoodsNum);
					console.log(item,singerPrice,'price价格')
					var price = translatePrice(singerPrice);
					console.log(price,'price价格')
					return price
				}
			},
			//获取申请售后接口信息 金额 商品信息
			getAfterSaleInfo(){
                let search = getUrl();
				// console.log(this.$route.query.orderNo,this.$route.query.goodsCode,this.$route.query);
				var orderNo = search.orderNo;
                var goodscode_buytype = search.goodsCode + '_' + search.buyType;
                let rid = search.rid;
				let url = window.api.trade_host + '/order/selectForOneAfterSale' + '/' + orderNo + '/' +rid; //测试
				// let url = window.api.trade_host + '/order/selectForOneAfterSale' + '/' + orderNo + '/' +goodscode_buytype; //预发布
				let config = {
					url:url,
					method: "GET",
					headers: {
						sessionId: this.sessionId,
					}
				}
				axios(config).then((res)=>{
					if(res.data.returnCode == 1){
						console.log(res,'查询利民接口');
						this.storeCode = res.data.data[1];
                        var arr = res.data.data[0].orderGoodsList;
                        this.upLoaddata["token"] = res.data.data[2];
						this.orderType = res.data.data[0].orderType;
						//所有的售后商品信息
						this.afterSaleGoodsArr = res.data.data[0].orderGoodsList;
						
						for(let i = 0; i < arr.length; i++){
							// buyType  1 代表所买的商品   2代表加购商品  3代表赠品  4代表积分购买商品  加价购可以单独申请退 但是与称重的一样不能选择退的数量
							if(arr[i].buyType == 1 || arr[i].buyType == 2 || arr[i].buyType == 4){
								this.shopObj = arr[i];  // 主商品
								this.afterSaleArr.push(arr[i]) // 主商品数组
							}
							if(arr[i].buyType == 3){
								this.sendArr.push(arr[i]);  // 赠品
							}
						}
						this.childNo = this.shopObj.orderNo;
						var type = res.data.data[0].type;
						this.getServerType(type);
						this.getReason();   //获取售后原因
						this.getQuery();
					}else{
						Toast({
							message: res.data.msg,
							type: 'fail',
							duration: 1000
						});
					}
					
					
				})
			},
			//确定是退货退款还是退款
			getServerType(type) {
				//称重商品不能只退部分  全都退
				// type 1 是退款  2 是 退货退款
				let obj = this.shopObj;
				if(obj.goodsType == 6 || obj.goodsType == 7){
					this.weighingFlag = true;
				}
				if(type == 1) {
					this.upLoaddata["serviceType"] = "1";
					this.aftermarkettype = "退款";
				} else if(type == 2) {
					this.upLoaddata["serviceType"] = "2";
					this.aftermarkettype = "退货退款";
                }
				// this.aftermarkettype = "退货退款";
				// this.showReason();
			},
			//调用图片上传回调   发起退货退款申请
			// getImgUrl(res) {
			// 	//				console.log(res,'tupian');
			// 	this.imgStatus = res;

			// 	//				console.log(this.imgStatus);
			// 	if(res.data) {
			// 		this.upLoaddata.voucherPhoto = res.data.join(',');
			// 	}
			// 	//console.log(this.upLoaddata.voucherPhoto,'拼接');
			// 	this.updataApplication();
			// },
			//上传图片 调用插件
			// upMethod() {
			// 	if(this.aftermarkettype == '退货退款') {
			// 		this.upLoadImg();
			// 	} else {
			// 		this.updataApplication();
			// 	}
			// },
			showPopup1() {
                // this.popupVisible = true;
                this.showBackReason = true;
            },
            hidePopup1(){
                this.showBackReason = false;
            },
			//获取后台退款 退货退款原因设置
			getReason(){
				let url = window.api.service_host  + "/afterSaleReason/selectReasonList";
				let config = {
					url: url,
					headers: {
						sessionId: this.sessionId,
					},
					method: "GET"
				}
				axios(config).then((res)=>{

					if(res.status == 200 && res.data.returnCode == 1){
						this.backMoneyReasonXW = res.data.data;
						for(let i = 0 ; i < this.backMoneyReasonXW.length; i++){
							if(this.aftermarkettype == '退款'){
								if(this.backMoneyReasonXW[i].type == 1 && this.backMoneyReasonXW[i].isShow == 1){
									let obj = {};
									obj.case = this.backMoneyReasonXW[i].reasonContext;
									obj.flag = false;
									obj.isImg = this.backMoneyReasonXW[i].isImg;
									this.backMoneyReason2.push(obj);
								}
							}else if(this.aftermarkettype == '退货退款'){
								if(this.backMoneyReasonXW[i].type == 2 && this.backMoneyReasonXW[i].isShow == 1){
									let obj = {};
									obj.case = this.backMoneyReasonXW[i].reasonContext;
									obj.isImg = this.backMoneyReasonXW[i].isImg;
									obj.flag = false;
									this.backMoneyReason2.push(obj);
								}
							}
						}
						this.backMoneyReason = this.backMoneyReason2;
						console.log(this.backMoneyReason2,'部分原因');
					}
				})
			},
			//获取申请退款金额  暂时先不计算运费
			getRefundamount() {
				let routeObj = this.shopObj;
				//计算优惠券后的商品单价（优惠券后台均摊到单个商品）   outGoodsNum
				console.log(routeObj.realTotalMoney,'計算金額')
				if(routeObj.goodsType == 7){
					this.refundamount = Number(routeObj.realTotalMoney).toFixed(2);
					return;
				}
				let singePrice = Number(routeObj.realTotalMoney) / Number(routeObj.outGoodsNum); 
				this.refundamount = singePrice * this.actureBackNum;   // 此時計算的是主商品的退款金額  
				var refundamountMoney = Number(this.refundamount);
				
				// if(this.sendArr && this.sendArr.length){          //计算加赠品后的价格  赠品是0 元
				// 	for(let i = 0; i < this.sendArr.length; i++){
				// 		refundamountMoney += Number(this.sendArr[i].realPrice) * Number(this.sendArr[i].goodsNum);
				// 	}
				// }
				// console.log(this.refundamount,'金额')
				// this.refundamount = Number(refundamountMoney).toFixed(2);
				this.refundamount = this.fixedNum(refundamountMoney);
			},
			//只保留两位小舒，不进行四舍五入
			fixedNum(str){
				var num = Number(str).toFixed(3);
					num = num.substring(0,num.lastIndexOf('.')+3);
					return num;
			},
			
			//获取申请退款金额  计算运费
			// getRefundamount() {
			// 	let routeObj = this.shopObj;
			// 	//计算优惠券后的商品单价（优惠券后台均摊到单个商品）  
			// 	console.log(routeObj.realTotalMoney,'計算金額')
			// 	if(routeObj.goodsType == 6 || routeObj.goodsType == 7){
			// 		if(routeObj.freight){
			// 			this.refundamount = ((routeObj.realTotalMoney) + Number(routeObj.freight)).toFixed(2);
			// 		}else{
			// 			this.refundamount = (routeObj.realTotalMoney).toFixed(2);
			// 		}
			// 		return;
			// 	}
			// 	let singePrice = Number(routeObj.realTotalMoney) / Number(routeObj.goodsNum);
			// 	//				console.log(singePrice);
			// 	if(this.aftermarkettype == '退货退款') {
			// 		this.refundamount = (singePrice * this.actureBackNum).toFixed(2);
					
			// 	} else if(this.aftermarkettype == '退款') {

			// 		if(Number(this.actureBackNum) == Number(routeObj.canAfterSaleNum)) {

			// 			if(this.backMoneyState === 0) {
			// 				this.refundamount = (singePrice * this.actureBackNum + Number(routeObj.freight)).toFixed(2);
			// 			} else {
			// 				this.refundamount = (singePrice * this.actureBackNum).toFixed(2);
			// 			}
			// 		} else {
			// 			this.refundamount = (singePrice * this.actureBackNum).toFixed(2);
			// 		}
			// 	}
			// },

			//是否退运费控制函数    实体商品退完了，就给用户退运费（虚拟商品不存在运费）

			backFreight() {
				//				afterSaleInfoAll:null,//售后单信息
				//				orderInfo:null, //总订单信息
				var arr = this.afterSaleInfoAll;
				//该订单中进行过售后的售后单信息  如果为空未进行过售后
				var afterSale = [];

				for(let i = 0; i < this.afterSaleInfoAll.length; i++) {
					//进行过售后
					if(arr[i].parentOrderno == this.parentNo) {
						afterSale.push(arr[i]);
					}
				}

				//申请售后的实体商品数量
				var afterSaleCount = 0;
				//获取申请售后的实体商品数量
				for(let j = 0; j < afterSale.length; j++) {
					//					console.log("//获取申请售后的实体商品数量", afterSale[j]);
					if(parseInt(afterSale[j].goodsType) == 0) {
						//						console.log("//获取申请售后的实体商品数量1111");
						afterSaleCount += Number(afterSale[j].goodsQuantity);
					}
				}
				//获取总订单中的实体商品数量
				//				console.log(this.orderInfo);
				let orderList = this.orderInfo[0].childOrderList;

				let goodsNum = 0;
				orderList.forEach(item => {
					item.orderDetails.forEach(item2 => {
						if(item2.goodsType == 0) {
							goodsNum += item2.goodsNum;
						}
					})
				});
				//console.log(66666666666666666);
				if(goodsNum == (afterSaleCount + parseInt(this.actureBackNum))) {
					//退完了
					return 0;
				} else {
					//没退完
					return 1;
				}
			},
			//初始化可退数量  后计算金额
			getQuery() {
				let obj = this.shopObj;
				console.log(this.shopObj,'shop');
				this.canBackNum = obj.canAfterSaleNum; //可退货数量
				this.actureBackNum = obj.canAfterSaleNum;

				if(obj.orderServeList) {
					//console.log(999999999999, obj.orderServeList==false)
					this.orderServeList = JSON.parse(obj.orderServeList);
					if(this.orderServeList.length) {
						this.upLoaddata.goodsServernos = this.orderServeList[0].serveId;
					}
				}
				//获取总单号 查询总单信息
				this.parentNo = obj.parentOrderNo;
				console.log(this.parentNo,'总订单号');
				this.getRefundamount();
				// this.getAfterSale();
				//console.log(this.parentNo,'总单')

			},
			//计算非赠品单类商品申请金额
			getGoodsApplyAmount(){
				var refundamountMoney = 0;
				if(routeObj.goodsType == 7){
					refundamountMoney = Number(routeObj.realTotalMoney).toFixed(2);
				}else{
					let singePrice = Number(routeObj.realTotalMoney) / Number(routeObj.outGoodsNum); 
					refundamountMoney = singePrice * this.actureBackNum;   // 此時計算的是主商品的退款金額  
					refundamountMoney = Number(refundamountMoney);
				}
				return refundamountMoney;
			},
			getAfterSaleAfterList(){
				//判断是否是主商品  如果是主商品  申请售后的数量就为用户选择的数量  如果为赠品那么就全都退
				var arr = [];
				// this.afterSaleGoodsArr   申请售后的商品列表
				// this.sendArr   申请售后的赠品列表
				// 主商品   buyType  1 代表所买的商品   2代表加购商品  3代表赠品
				for(let i = 0; i < this.afterSaleGoodsArr.length; i++){
					if(this.afterSaleGoodsArr[i].buyType == 1 || this.afterSaleGoodsArr[i].buyType == 2){
						let obj = {};
						//称重的传重量  非称重的传数量
						if(this.afterSaleGoodsArr[i].goodsType == 7){
							obj["actualWeight"] = this.afterSaleGoodsArr[i].outGoodsNum;
						}else{
							obj["applyQuantity"] = this.actureBackNum;
                        }
                        obj["goodsName"] = this.afterSaleGoodsArr[i].goodsName;
						obj["goodsImg"] = this.afterSaleGoodsArr[i].goodsImg;
						obj["goodsId"] = this.afterSaleGoodsArr[i].goodsId;
						obj["goodsCode"] = this.afterSaleGoodsArr[i].goodsCode;
						obj["goodsType"] = this.afterSaleGoodsArr[i].goodsType;
                        obj["buyType"] =   this.afterSaleGoodsArr[i].buyType;
                        obj["giftFrom"] = this.afterSaleGoodsArr[i].giftFrom; //商品giftFrom
						obj["orderGoodsId"] = this.afterSaleGoodsArr[i].rid; //商品rid
						obj["goodsApplyAmount"] = Number(this.refundamount); //单类商品申请金额  赠品申请退款金额为0 
						//单个商品成交金额参数
						var item1 = this.afterSaleGoodsArr[i];
						obj["goodsOriginalPrice"] = this.afterSaleGoodsArr[i].goodsPrice; //商品原价
						obj["goodsDealPrice"] = this.getSingerPrice(item1); //成交價    goodsType 为6 的商品 价格不能取 realPrice
						obj["goodsDiscountPrice"] = this.afterSaleGoodsArr[i].promotionMinis; //优惠金额
						if(this.afterSaleGoodsArr[i].mallUnit) {
							obj["goodsSpec"] = this.afterSaleGoodsArr[i].mallUnit;
                        }
                        obj["workingInfo"] = this.afterSaleGoodsArr[i].workingInfo;
						arr.push(obj);
					}else if(this.afterSaleGoodsArr[i].buyType == 4){
						let obj = {};
						//称重的传重量  非称重的传数量
						if(this.afterSaleGoodsArr[i].goodsType == 7){
							obj["actualWeight"] = this.afterSaleGoodsArr[i].outGoodsNum; 
						}else{
							obj["applyQuantity"] = this.afterSaleGoodsArr[i].outGoodsNum;
						}
						obj["goodsName"] = this.afterSaleGoodsArr[i].goodsName;
						obj["goodsImg"] = this.afterSaleGoodsArr[i].goodsImg;
						obj["goodsId"] = this.afterSaleGoodsArr[i].goodsId;
						obj["goodsCode"] = this.afterSaleGoodsArr[i].goodsCode;
						obj["goodsType"] = this.afterSaleGoodsArr[i].goodsType;
                        obj["buyType"] =   this.afterSaleGoodsArr[i].buyType;
                        obj["giftFrom"] = this.afterSaleGoodsArr[i].giftFrom; //商品giftFrom
						obj["orderGoodsId"] = this.afterSaleGoodsArr[i].rid; //商品rid
						console.log(this.afterSaleGoodsArr[i].actualWeight,'称重重量')
						//单个商品成交金额参数
						var item2 = this.afterSaleGoodsArr[i];
						obj["goodsOriginalPrice"] = this.afterSaleGoodsArr[i].goodsPrice; //商品原价
						obj["goodsDealPrice"] = this.getSingerPrice(item2); //成交價
						obj["goodsDiscountPrice"] = this.afterSaleGoodsArr[i].promotionMinis; //优惠金额
						obj["goodsApplyAmount"] = this.refundamount ; //单类商品申请金额  赠品申请退款金额为0 
						// if(this.afterSaleGoodsArr[i].goodsUnit) {
						// 	obj["goodsSpec"] = this.afterSaleGoodsArr[i].goodsUnit;  // 规格字段 直接传的单位  前端取用
                        // }
                        if(this.afterSaleGoodsArr[i].mallUnit) {
							obj["goodsSpec"] = this.afterSaleGoodsArr[i].mallUnit;
						}
						arr.push(obj);
					}
				}
				// 赠品
				for(let j = 0 ; j < this.sendArr.length; j++){
					if(this.sendArr[j].buyType == 3){
						let obj = {};
						//称重的传重量  非称重的传数量
						if(this.sendArr[j].goodsType == 7){
							obj["actualWeight"] = this.sendArr[j].outGoodsNum; 
						}else{
							obj["applyQuantity"] = this.sendArr[j].outGoodsNum;
						}
						obj["goodsName"] = this.sendArr[j].goodsName;
						obj["goodsImg"] = this.sendArr[j].goodsImg;
						obj["goodsId"] = this.sendArr[j].goodsId;
						obj["goodsCode"] = this.sendArr[j].goodsCode;
						obj["goodsType"] = this.sendArr[j].goodsType;
                        obj["buyType"] =   this.sendArr[j].buyType;
                        obj["giftFrom"] = this.sendArr[j].giftFrom; //商品giftFrom
						obj["orderGoodsId"] = this.sendArr[j].rid; //商品rid
						console.log(this.sendArr[j].actualWeight,'称重重量')
						//单个商品成交金额参数
						var item2 = this.sendArr[j];
						obj["goodsOriginalPrice"] = this.sendArr[j].goodsPrice; //商品原价
						obj["goodsDealPrice"] = this.getSingerPrice(item2); //成交價
						obj["goodsDiscountPrice"] = this.sendArr[j].promotionMinis; //优惠金额
                        obj["goodsApplyAmount"] = 0 ; //单类商品申请金额  赠品申请退款金额为0 
						
                        if(this.sendArr[j].mallUnit) {
							obj["goodsSpec"] = this.sendArr[j].mallUnit;// 规格字段 直接传的单位  前端取用
                        }
                         
						arr.push(obj);
					}
				}
                console.log(arr,'传入后台申请售后的goodsList');
				return arr;
				
			},
			//根据门店code获取门店名称
			getStoreName(code){
				//获取首页存的门店
				var list = this.getStoreList;
				var store = null;
				for(let i = 0; i < list.length; i++){
					if(code == list[i].storeCode){
						store = list[i].storeName;
						console.log(store,'//8/8/8/8/8/8/8/');
					}
				}
				return store;
			},
			getParams() {
				if(this.sessionId && this.userInfo != null) {
					this.upLoaddata["userPhone"] = this.userInfo.mobile;
					this.upLoaddata["enterpriseCode"] = window.api.enterpriseCode;

				}

				this.upLoaddata["shopName"] = this.getStoreName(this.storeCode); //获取门店名称
				this.upLoaddata["serviceDesc"] = this.reasonmsg.replace(/\$/g,'');
				//售后申请时间
				this.upLoaddata["applyTm"] = new Date().getTime();
				
				this.upLoaddata["orderCreateTm"] = this.shopObj.createTm;
			
				this.upLoaddata["orderNo"] = this.childNo; // 子单号
				this.upLoaddata["goodsList"] = this.getAfterSaleAfterList();
				this.upLoaddata["applyAmount"] = this.refundamount;
				this.upLoaddata["orderType"] = this.orderType;
			},
			delCount() {
				let count = this.actureBackNum;
				if(count > 1 && count <= this.canBackNum) {
					this.actureBackNum--;
				}
				this.getRefundamount();
				//				console.log(this.actureBackNum);
			},
			addCount() {
				let count = this.actureBackNum;
				if(count > 0 && count < this.canBackNum) {
					this.actureBackNum++;
				}
				this.getRefundamount();
				//				console.log(this.actureBackNum);
			},
			changeCheckFlag(event, index, reason) {
				for(let i = 0; i < this.backMoneyReason.length; i++) {

					if(i == index) {
						this.backMoneyReason[i].flag = true;
						//如果当前点击的仍然为选中的那一个，选中状态保留
						if(this.backMoneyReason[i].case === reason) {
							event.target.checked = true;
						}

					} else {
						this.backMoneyReason[i].flag = false;
					}
                }
                // this.getBackReason();
			},
			getBackReason() {
				for(let i = 0; i < this.backMoneyReason.length; i++) {
					if(this.backMoneyReason[i].flag) {
						this.upLoaddata.serviceReason = this.backMoneyReason[i].case;
						if(this.backMoneyReason[i].isImg == 1){
							this.isImg = true;
						}else{
							this.isImg = false;
						}
					}
				}
				this.showBackReason = false;
			},
			showGoBackPopup() {
				this.popupGoBack = true;
			},
			changeGoBackFlag(event, index, methodType){
				for(let i = 0; i < this.goBackMethods.length; i++) {
					if(i == index) {
						this.goBackMethods[i].flag = true;
						//如果当前点击的仍然为选中的那一个，选中状态保留
						if(this.goBackMethods[i].case === methodType) {
							event.target.checked = true;
						}

					} else {
						this.goBackMethods[i].flag = false;
					}
				}
			},
			getGoBackFlag() {
				for(let i = 0; i < this.goBackMethods.length; i++) {
					if(this.goBackMethods[i].flag) {
						this.upLoaddata.goodsReturnWay = Number(i+1);
					}
				}

				this.popupGoBack = false;
			},
			//获取packing参数    实现checked选中的值，点击切换
			changePacking(index) {
				//				console.log(123456);
				for(let i = 0; i < this.packingCase.length; i++) {
					if(!this.packingCase[i].flag) {
						if(i == index) {
							this.packingCase[i].flag = true;
							this.upLoaddata.packing = Number(i);
						} else {
							this.packingCase[i].flag = false;
						}
					} else {
						this.packingCase[i].flag = false;
					}
				}

				if(this.packingCase[0].flag == false && this.packingCase[1].flag == false) {
					this.upLoaddata.packing = null;
				}

			},
			//提交请求前校验
			checkInfo() {

				var obj = this.upLoaddata;
				console.log(this.upLoaddata.packing, 'this.upLoaddata.packing')
				if(this.aftermarkettype == "退货退款") {
					//部分原因需要上传图片
					var flag = false;
					console.log(this.isImg,this.upLoaddata.packing)
					if(this.isImg) {
						flag = true;
					}

					if(!obj.serviceReason) {
						Toast({
							message: '请选择退货退款申请原因',
							type: 'fail',
							duration: 1000
						});
						return;
					} else if(!obj.goodsReturnWay){
						Toast({
							message: '请选择退回方式',
							type: 'fail',
							duration: 1000
						});
						return;
						
					}else if(obj.packing == null || obj.packing == undefined) {
						Toast({
							message: '请选择质量情况',
							type: 'fail',
							duration: 1000
						});
						return;
					} else if(this.imgStatus.status == 2 && flag) {

						Toast({
							message: '请上传商品图片',
							type: 'fail',
							duration: 1000
						});
						return;
					} else if(this.imgStatus.status == 0 && flag) {
						Toast({
							message: '上传图片失败',
							type: 'fail',
							duration: 1000
						});
						return;
					} else if(Number(this.actureBackNum) > Number(this.canBackNum) || Number(this.actureBackNum) < 0) {
						Toast({
							message: '申请数量有误',
							type: 'fail',
							duration: 1000
						});
						return;
					} else {
						this.upFlag = true;
						return;
					}

				} else if(this.aftermarkettype == "退款") {
					if(!obj.serviceReason) {
						Toast({
							message: '请选择退款申请原因',
							type: 'fail',
							duration: 1000
						});
						return;
					} else if(Number(this.actureBackNum) > Number(this.canBackNum) || Number(this.actureBackNum) < 0) {
						Toast({
							message: '申请数量有误',
							type: 'fail',
							duration: 1000
						});
						return;
					} else {
						//						console.log(12346)
						this.upFlag = true;
						return;
					}
				}
			},
			//上传图片
			// upLoadImg() {
			// 	this.$refs.imgUp.upload();
			// },
			async updataApplication() {
                //图片参数\
				if(this.aftermarkettype == "退货退款"){
					let imgObj =  await this.$refs.imgUp.upload();
					this.imgStatus = imgObj;
					if(imgObj.data) {
						this.upLoaddata.voucherPhoto = imgObj.data.join(',');
					}
				}

				this.getParams();
				this.checkInfo();
				let url = window.api.service_host + "/afterSales/insertOrUpdateAfterSales";

				let config = {
					url: url,
					headers: {
						'sessionId': this.sessionId,
						'Content-Type': 'application/json',
						'Accept': 'application/json'
					},
					data: this.upLoaddata,
					method: "POST"
				};
				console.log(this.upLoaddata, '请求参数');
				console.log(JSON.stringify(this.upLoaddata), '请求参数');
				// 限制金额为0 时不能申请售后  需求已取消
				// if(this.refundamount == 0) {
				// 	this.upFlag = false;
				// 	Toast({
				// 		message: '商品金额不能为0',
				// 		type: 'fail', // type: 'success'
				// 		duration: 1000
				// 	});
				// }
						
				if(this.upFlag) {
					showLoading();
					axios(config).then((res) => {
                        console.log(res,'申请售后接口返回')
						if(res.data.returnCode == 1) {
							Toast({
								message: '申请已提交',
								type: 'success',
								duration: 1000
							});
                            hideLoading();
                            //返回 rn 页面
                            let titleConfig = JSON.stringify({
                                type: EXIT_WEBVIEW,
                            })
                            setTimeout(() => {
                                window.postMessage(titleConfig)
                            },300)

						} else {
							Toast({
								message:'申请失败' ,
								type: 'fail',
								duration: 1000
							});
                            this.upLoaddata["token"] = res.data.data[0];
							hideLoading();
						}
					}).catch((err) => {
						hideLoading();
					})
				}
			},
			/* 已弃用 获取售后单信息 getAfterSale()  =>   获取订单信息getOrderInfo() => 计算是否要退运费 backFreight() => 计算总退款金额*/
			//获取售后单信息
			getAfterSale() {
				//省悟
				let url = window.api.service_host + "/afterSales/selectAfterSalesList" + '?' + "token=" + new Date().getTime();
				let config = {
					url: url,
					headers: {
						'sessionId': this.sessionId,
						'Content-Type': 'application/json',
						'Accept': 'application/json'
					},
					method: "GET"
				};
				axios(config).then((res) => {
					this.afterSaleInfoAll = res.data.data;
					// this.getOrderInfo();
				})
			},
			//获取订单信息
			getOrderInfo() {
				let url = window.api.trade_host+'/order/selectOrderDetail/'+ this.parentNo;
				let config = {
					url: url,
					headers: {
						'sessionId': this.sessionId,
						'Content-Type': 'application/json',
						'Accept': 'application/json'
					}
				};

				axios(config).then(res => {
					console.log(res.data.data,'獲取訂單信息');
					this.orderInfo = res.data.data;
					// this.backMoneyState = this.backFreight();
					// 获取退款金额信息
					// 					console.log(this.backMoneyState,'this.backMoneyState');
					// this.getRefundamount();
					// this.getPriceParams(this.orderInfo);
				})
			},
			//监听买家留言框的focus事件 开始
	        initTextareaFocusEvent() {
	            this.$refs.note.onfocus = () => {
	                console.log("input框框获取到了焦点");
	                this.initInputStyle();
	            }
	            this.$refs.note.onblur = () => {
	                console.log("失去焦点");
	                //重置样式
	                this.unsetStyle();
	                
	            }
	        },
	        //如果是安卓机,调整页面margin-bottom供用户看到input框
	        initInputStyle() {
	            let isAndroid = navigator.userAgent.indexOf("Android") > -1;
	            if (isAndroid) {

					let box = document.getElementById('afterSaleContent');
					let box2 = document.getElementById('AfterSaleOutBox');

	                let scrollTopContainer = document.body;

	                box.style.marginBottom = "10vh";
	                box2.scrollTop = 200;
					// console.log(box.scrollTop,'滚动');
					// console.log(box.scrollTop,'滚动');
	                //给一个scrollTop值的变化，自动滑上去
	                let distance = parseInt(getComputedStyle(box, null).marginBottom.slice(0, -2));
	                let duration = 200 / 16.7;
	                let speed = distance / duration;
	                this.scrollAnim = setInterval(() => {
	                    scrollTopContainer.scrollTop += speed;
	                    if (scrollTopContainer.scrollTop >= distance) {
	                    	console.log("/-*****-/");
	                        scrollTopContainer.scrollTop = distance;
	                        clearInterval(this.scrollAnim);
	                    }
	                }, 16.7);
	            }
	        },
	        unsetStyle() {
	            //清除计时器
	            clearInterval(this.scrollAnim);
	            this.scrollAnim = null;
				let box = document.getElementById('afterSaleContent');
				let box2 = document.getElementById('AfterSaleOutBox');
	            box.style.marginBottom = "unset";
	            box2.scrollTop = 0;
	        },
	        //监听买家留言框的focus事件  结束
		},
		mounted() {
            this.initTextareaFocusEvent();
	    },
		beforeDestroy() {
			this.upFlag = false;
		},
		computed: {
			...mapGetters("qxz", [
				"getStoreList"
			]),
			...mapGetters("wxh", [
				"sessionId",
				"userInfo"
            ]),
            screenWidth() {
				return window.innerWidth;
            },
            zxPageHeight(){
				return window.screen.height - 80;
            },
            zxPageWidth(){
				return window.screen.width;
			},
			//此方法并未使用 
			actureBackNumData: {
				set: function(value) {
					this.actureBackNum = value;
				},
				get: function() {
					if(parseInt(this.actureBackNum) < 0) {
						//						console.log("小于0");
						return this.canBackNum;
					} else if(parseInt(this.actureBackNum) > this.canBackNum) {
						//						console.log("da于0");
						return this.canBackNum;
					} else {
						return this.actureBackNum;
					}
				}
			}
		},
		created() {
            console.log('申请售后页面')
            let titleConfig = JSON.stringify({
                type: CHANGE_NAVIGATION,
                params: {
                    title: "申请售后"
                }
            })
            setTimeout(() => {
                window.postMessage(titleConfig)
            },300)
            this.getAfterSaleInfo();
            // this.upLoaddata["serviceType"] = "2";
			// 		this.aftermarkettype = "退货退款";
            
		}
	}
</script>

<style scoped="scoped">
	.checkeB {}
	
	.checkeB {
		display: block;
	}
	
	.packingCase {
		-webkit-justify-content: space-between;
		justify-content: flex-start;
		/*margin-left:1rem;*/
	}
	
	.packingCase input {
		margin-top: 0.5rem;
		margin-left: 3rem;
	}
	
	.mint-popup {
		width: 100%;
	}
    .myMaster{
        width: 100%;
        height: 100%;
        background: black;
        position: absolute;
        top: 0;
        left: 0;
        z-index: 5;
        opacity: 0.7;
    }
	.myPopup {
        width: 100%;
        min-height: 50vh;
        max-height: 70vh;
        display: flex;
        flex-direction: column;
        background: #fff;
        position: absolute;
        z-index: 10;
        bottom: 0;
        left: 0;
        /* transition: height 2s; */
    }
    .myPopupFlase {
        width: 100%;
        height:0;
        display: flex;
        flex-direction: column;
        background: #fff;
        position: absolute;
        z-index: 10;
        bottom: 0;
        left: 0;
        transition: height 2s;
    }
    .myPopupHeader {
        height: 2rem;
        width:100%;
        line-height: 2rem;
        /* position: relative; */
        /* border-top:  1px solid #e8e8e8; */
    }
    .myPopupContent {
        width:100%;
        flex:1;
        overflow-y: auto;
    }
    .myPopupFooter {
        background: #ef5423;
        height: 2.5rem;
        line-height: 2.5rem;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
    }
    .myPopupItem{
        width: 100%;
        border-bottom:1px solid #e8e8e8;
        display: flex;
        justify-content: space-between;
        align-items: center;
        height: 2rem;
    }
    .zx_close_page{
        padding: .4rem .6rem;
        cursor: pointer;
        /* margin-left: .4rem; */
        margin-top: -2px;
        position: absolute;
        top: 0;
        left: 85%;
        will-change: transform;
        -webkit-transition: -webkit-transform .2s ease-out .1s;
        transition: -webkit-transform .2s ease-out .1s;
        transition: transform .2s ease-out .1s;
        transition: transform .2s ease-out .1s,-webkit-transform .2s ease-out .1s;
    }
    .zx_close_page i{
        display: block;
        height: 1.2px;
        width: 1.2rem;
        margin: 6px 0;
        opacity: .8;
        -webkit-transition: -webkit-transform .2s ease-out;
        transition: -webkit-transform .2s ease-out;
        transition: transform .2s ease-out;
        transition: transform .2s ease-out,-webkit-transform .2s ease-out;
        background-color: #444;
    }
    .zx_close_page i:first-child {
        transform: translateY(.35rem) rotate(-45deg) scale(1);
    }
    .zx_close_page i:nth-child(2) {
        opacity: 0;
        transform-origin: 50% 50% 0;
    }
    .zx_close_page i:nth-child(3) {
        transform: translateY(-.35rem) rotate(45deg) scale(1);
    }
	.message_list {
		padding: 0;
		/*padding-right:0 ;*/
	}
	.myContent {
        width: 100%;
        height: 100%;
        position: relative;
        /* overflow-y: auto; */
        display: flex;
        flex-direction: column;
	}
	.liuyan{
		overflow: auto;
	    padding: 0.5rem;
	    height: 2rem;
	    line-height: 1rem;
	    resize: none;
	}
	.server_show::after{
		border: 0px solid;
	}
	.edit_data_click{
		border: 1px solid #EF5423;
	}
	.edit_data_click::before{
		background: #EF5423;
	}
	.add_to_cart_no{
		border: 1px solid #a0a0a0 !important;
	}
	.add_to_cart_no::before{
		background: #a0a0a0 !important;
	}
	.add_to_cart_no::after{
		background: #a0a0a0 !important;
	}
	.lijixiadanC{
        padding:0.5rem 0.7rem;
    }
    .myWorkingFeeBox{
        display: flex;
        flex-direction: row;
        flex: 1;
    }
    .myWorkingFee{
        flex:1;
        padding-top: 0.3rem;
        padding-bottom:0.25rem;
        display: flex;
        justify-content: space-between;
        padding-right: 0.75rem;
        border-top: 1px solid #eaeaea;
    }
</style>